#ifndef THREADMOUNT_H
#define THREADMOUNT_H
#include <QThread>
#include <QDateTime>
#include <type.h>
#include "qextserialport.h"
#include "qextserialenumerator.h"
#include <mount/gto1200.h>
#include <logger/logmanager.h>
#include <serial.h>

class threadmount: public QThread
{
    Q_OBJECT
public:
    threadmount();
    ~threadmount();
    QVector<QextSerialPort*> ScanSerialPort();
    int SearchMount(QVector<QextSerialPort *>,QString);
    int SearchMount();
    int SearchMount(QextSerialPort *);
    void setMode(int);
    int OpenPort(QString PortNum);
    int ReadInfos();

    void ThreadMoveStop();
    void ThreadMoveNorth(int val);
    void ThreadMoveSouth(int val);
    void  ThreadMoveEast(int val);
    void ThreadMoveWest(int val);

    bool bStop;
    private:
    logmanager       *pLog;
    gto1200          *pMount;
    QextSerialPort   * port;
    QString          stringOS;
    QVector<QextSerialPort*> TabValidePort;

protected:
    void run();
    int Mode;
public slots:
    void MoveN();
    void MoveE();
    void MoveW();
    void MoveS();
    void Stop();
signals:
    void	PeriphError(int,int);							//!< Signal erreur de peripherique (pour l'IHM)
    void	SendInfos(Monture);
    void    SendStatusSerial(QString,int);


public slots:

};

#endif // THREADMOUNT_H
